<template>
  <div id="app">
    <router-view/>
  </div>

</template>

<script>
export default {
  name:"App",
  created(){
    // localStorage.removeItem('token')
    if(sessionStorage.getItem('store')){
      this.$store.replaceState(Object.assign({},this.$store.state,JSON.parse(sessionStorage.getItem('store'))));
    }
    window.addEventListener('beforeunload',()=>{
      sessionStorage.setItem('store',JSON.stringify(this.$store.state))
    })
  }
}
</script>

<style>
#app {
  font-family: "Microsoft YaHei" ! important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
html,body,#app{
    width: 100%;
    height: 100%;
}
*{
  margin: 0;
  padding: 0;
}

</style>
